const _import = require('./_import_' + process.env.NODE_ENV)

import Layout from '../views/layout/Layout'

/**
* hidden: true                   if `hidden:true` will not show in the sidebar(default is false)(当设置 true 的时候该路由不会再侧边栏出现 如401，login等页面，或者如一些编辑页面/edit/1)
* alwaysShow: true               if set true, will always show the root menu, whatever its child routes length(设置 alwaysShow: true，这样它就会忽略之前定义的规则，一直显示根路由)
*                                if not set alwaysShow, only more than one route under the children
*                                it will becomes nested mode, otherwise not show the root menu
* redirect: noredirect           if `redirect:noredirect` will no redirct in the breadcrumb(当设置 noRedirect 的时候该路由在面包屑导航中不可被点击)
* name:'router-name'             the name is used by <keep-alive> (must set!!!)(设定路由的名字，一定要填写不然使用<keep-alive>时会出现各种问题)
* meta : {
    roles: ['admin','editor']     will control the page roles (you can set multiple roles)(设置该路由进入的权限，支持多个权限叠加)
    title: 'title'               the name show in submenu and breadcrumb (recommend set)(设置该路由在侧边栏和面包屑中展示的名字)
    icon: 'svg-name'             the icon show in the sidebar,(设置该路由的图标)
    noCache: true                if true ,the page will no be cached(default is false)(如果设置为true，则不会被 <keep-alive> 缓存(默认 false))
  }
**/
import welcome from '@/views/welcome.vue'

// 动态路由 登录成功后 在router.beforeEach中根据后端权限 加载不同路由 已展示不同的左侧菜单
export const asyncRouterMap = [
  {
    path: '/',
    redirect: '/login',
    hidden: true
  },
  {
    path: '#/',
    redirect: '/login',
    hidden: true
  },
  // 平台首页
  {
    path: '/home',
    component: Layout,
    redirect: '/home/index',
    hidden: true,
    meta: {
      title: '首页',
      icon: 'dashboard',
      noCache: true,
      interfaceName: '首页'
    },
    children: [{
      path: 'index',
      component: _import('home/index'),
      name: 'home',
      meta: {
        title: '首页',
        icon: 'dashboard',
        noCache: true,
        interfaceName: '首页'
      }
    }
    ]
  },
  {
    // 物流管理
    path: '/logistics/',
    name: 'logistics',
    component: Layout,
    redirect: 'logistics',
    meta: {
      title: '物流管理',
      icon: 'people',
      noCache: false
    },
    children: [
      {
        path: '/storeIssue/',
        name: 'storeIssue',
        component: _import('index'),
        redirect: 'storeIssue',
        meta: {
          title: '发料管理',
          icon: 'people',
          noCache: false
        },
        children: [
          {
            path: 'logisticsPdf',
            component: _import('filesUpload/logisticsPdf'),
            name: 'logisticsPdf',
            meta: {
              title: '物流文件上传',
              icon: 'example',
              noCache: false,
              interfaceName: '物流文件上传'
            }
          }
        ]
      }
    ]
  },
  // 数据管理（数控车间、焊接车间）
  {
    // 对工段长、QC质量检、超级管理员、数控机台调度员开放
    path: '/CNCmachine/',
    name: 'CNCmachine',
    component: Layout,
    redirect: 'CNCmachine',
    meta: {
      title: '数据管理',
      icon: 'people',
      noCache: false,
      roles: [0, 1, 3, 4, 9, 14, 16, 25, 27, 29, 30, 32, 36, 37, 38, 41, 42, 43]
    },
    children: [
      {
        path: 'CNCqualityDetail',
        component: _import('CNCmachine/CNCqualityDetail'),
        name: 'CNCqualityDetail',
        hidden: true,
        meta: {
          title: '质检详情',
          icon: 'example',
          noCache: false,
          interfaceName: '质检详情',
          roles: [0, 3, 14, 25, 37, 38, 43]
        }
      },
      {
        path: 'manArate',
        component: _import('CNCmachine/manArate'),
        name: 'manArate',
        hidden: true,
        meta: {
          title: '工时达成率',
          icon: 'example',
          noCache: false,
          interfaceName: '工时达成率',
          roles: [0, 14, 37]
        }
      }
    ]
  },
  // 生产管理
  {
    path: '/production/',
    name: 'production',
    component: Layout,
    // redirect: 'production',
    meta: {
      title: '生产管理',
      icon: 'people',
      noCache: false,
      // roles: [0, 1, 2, 14, 16, 25, 27, 30, 32, 36, 37, 38, 39, 40, 41,42, 43]
    },
    children:[
      {
        path: 'parameterDetection',
        component: _import('reClockIn/parameterDetection'),
        name: 'parameterDetection',
        meta: {
          title: '前处理及喷涂关键工艺参数修改',
          icon: 'example',
          noCache: false,
          interfaceName: '前处理及喷涂关键工艺参数修改',
          roles: [0, 14]
        }
      },
      // 机台管理对超级管理员和员工管理员、数控机台调度员开放
      {
        path: '/machine/',
        name: 'machine',
        component: _import('index'),
        redirect: 'machine',
        meta: {
          title: '机台管理',
          icon: 'people',
          noCache: false,
          roles: [0, 2, 14, 25, 36, 37, 38, 39, 41, 43]
        },
        children: [
          {
            path: 'addMachine',
            component: _import('machine/addMachine'),
            name: 'add_machine',
            meta: {
              title: '机台新增',
              icon: 'example',
              noCache: false,
              interfaceName: '机台新增',
              roles: [0, 14]
            }
          },
          {
            path: 'checkMachine',
            component: _import('machine/checkMachine'),
            name: 'check_Machine',
            meta: {
              title: '机台查询',
              icon: 'example',
              noCache: false,
              interfaceName: '机台查询'
            }
          },
          {
            path: 'machineStatus',
            component: _import('machine/machineStatus'),
            name: 'machine_Status',
            meta: {
              title: '机台状态',
              icon: 'example',
              noCache: false,
              interfaceName: '机台状态'
            }
          }
        ]
      },
      // 工单及入库
      // 对超级管理员、计划、机台调度员开放
      {
        path: '/orderAndMachine/',
        name: 'orderAndMachine',
        component: _import('index'),
        redirect: 'orderAndMachine',
        meta: {
          title: '工单及入库',
          icon: 'people',
          noCache: false,
          roles: [0, 1, 4, 9, 14, 16, 25, 27, 29, 30, 32, 36, 37, 38, 40, 41, 42, 43]
        },
        children: [
          {
            path: 'processOrder',
            component: _import('orderAndMachine/processOrder'),
            name: 'processOrder',
            meta: {
              title: '工单工艺',
              icon: 'example',
              noCache: false,
              interfaceName: '工单工艺',
              roles: [0, 9, 14, 16, 25, 30, 32, 37, 38, 40, 41, 42, 43]
            }
          },
          {
            path: 'orderAndMachine',
            component: _import('orderAndMachine/orderAndMachine'),
            name: 'orderAndMachine',
            meta: {
              title: '机台添加工单',
              icon: 'example',
              noCache: false,
              interfaceName: '机台添加工单',
              roles: [0, 14, 16, 25, 32, 38, 40, 41, 42, 43]
            }
          },
          {
            path: 'orderList',
            component: _import('orderAndMachine/orderList'),
            name: 'orderList',
            meta: {
              title: '工单查询修改删除',
              icon: 'example',
              noCache: true,
              interfaceName: '工单查询修改删除',
              roles: [0, 1, 14, 16, 25, 27, 30, 32, 36, 37, 38, 40, 41, 42, 43]
            }
          },
          // 工段长上线工单
          {
            path: 'leaderPlanOnline',
            component: _import('planOnlineback/leaderPlanOnline'),
            name: 'leaderPlanOnline',
            meta: {
              title: '工段长上线工单',
              icon: 'example',
              noCache: false,
              interfaceName: '工段长上线工单',
              roles: [0, 9, 14, 25, 38, 41, 43]
            }
          },
          // 超期工单
          // 车间主任、超级管理员
          {
            path: 'overdue',
            component: _import('overdue/overdue'),
            name: 'overdue',
            meta: {
              title: '超期工单查询',
              icon: 'example',
              noCache: true,
              interfaceName: '超期工单查询',
              roles: [0, 14, 15, 37]
            }
          },
          {
            path: 'cncWarehouse',
            component: _import('productionPlan/cncWarehouse'),
            name: 'cncWarehouse',
            meta: {
              title: '工单入库',
              icon: 'example',
              noCache: false,
              interfaceName: '工单入库',
              roles: [0, 9, 14, 25, 38, 41, 43]
            }
          },
          {
            path: 'printFlowCard',
            component: _import('orderAndMachine/printFlowCard'),
            name: 'printFlowCard',
            meta: {
              title: '流程卡查询打印',
              icon: 'example',
              noCache: false,
              interfaceName: '流程卡查询打印',
              roles: [0, 14, 16, 25, 32, 38, 40, 41, 42, 43]
            }
          },
          // {
          //   path: 'ptprintFlowCard',
          //   component: _import('orderAndMachine/ptprintFlowCard'),
          //   name: 'ptprintFlowCard',
          //   meta: {
          //     title: '喷涂流程卡查询打印',
          //     icon: 'example',
          //     noCache: false,
          //     interfaceName: '喷涂流程卡查询打印',
          //     roles: [0, 14, 41, 42]
          //   }
          // },
          {
            path: 'printFlowCardRecords',
            component: _import('orderAndMachine/printFlowCardRecords'),
            name: 'printFlowCardRecords',
            meta: {
              title: '流程卡打印记录',
              icon: 'example',
              noCache: false,
              interfaceName: '流程卡打印记录',
              roles: [0, 14, 16, 25, 30, 32, 37, 38, 40, 41, 42, 43]
            }
          },
          {
            path: 'proEfficiency',
            component: _import('CNCmachine/proEfficiency'),
            name: 'proEfficiency',
            meta: {
              title: '工序生产达成率',
              icon: 'example',
              noCache: false,
              interfaceName: '工序生产达成率',
              roles: [0, 1, 4, 9, 14, 16, 25, 27, 29, 30, 32, 36, 37, 38, 41, 42, 43]
            }
          }
        ]
      },
      // MES看板齐套页面
      {
        path: '/complete/',
        name: 'complete',
        component: _import('index'),
        redirect: 'complete',
        meta: {
          title: 'MES看板齐套页面',
          icon: 'people',
          noCache: true
        },
        children: [
          {
            path: 'skComplete',
            component: _import('complete/skComplete'),
            name: 'skComplete',
            meta: {
              title: '数控车间齐套看板',
              icon: 'example',
              noCache: false,
              interfaceName: '数控车间齐套看板'
            }
          },
          {
            path: 'hjComplete',
            component: _import('complete/hjComplete'),
            name: 'hjComplete',
            meta: {
              title: '焊接车间齐套看板',
              icon: 'example',
              noCache: false,
              interfaceName: '焊接车间齐套看板'
            }
          },
          {
            path: 'ptComplete',
            component: _import('complete/ptComplete'),
            name: 'ptComplete',
            meta: {
              title: '喷涂车间齐套看板',
              icon: 'example',
              noCache: false,
              interfaceName: '喷涂车间齐套看板'
            }
          }
        ]
      },
      // 员工扫码
      {
        path: '/staffscan/',
        name: 'staffscan',
        component: _import('index'),
        redirect: 'staffscan',
        meta: {
          title: '员工扫码明细',
          icon: 'people',
          noCache: true
        },
        children: [
          {
            path: 'otherScanRecords',
            component: _import('staffscan/otherScanRecords'),
            name: 'otherScanRecords',
            meta: {
              title: '装配车间扫码',
              icon: 'example',
              noCache: false,
              interfaceName: '装配车间扫码'
            }
          },
          {
            path: 'emsScanRecords',
            component: _import('staffscan/emsScanRecords'),
            name: 'emsScanRecords',
            meta: {
              title: 'ems车间扫码',
              icon: 'example',
              noCache: false,
              interfaceName: 'ems车间扫码'
            }
          },
          {
            path: 'scanRecords',
            component: _import('staffscan/scanRecords'),
            name: 'scanRecords',
            meta: {
              title: '数控车间扫码',
              icon: 'example',
              noCache: false,
              interfaceName: '数控车间扫码'
            }
          },
          {
            path: 'weldScanRecords',
            component: _import('staffscan/weldScanRecords'),
            name: 'weldScanRecords',
            meta: {
              title: '焊接车间扫码',
              icon: 'example',
              noCache: false,
              interfaceName: '焊接车间扫码'
            }
          },
          {
            path: 'sprayScanRecords',
            component: _import('staffscan/sprayScanRecords'),
            name: 'sprayScanRecords',
            meta: {
              title: '喷涂车间扫码',
              icon: 'example',
              noCache: false,
              interfaceName: '喷涂车间扫码'
            }
          }
        ]
      },
      // 开放于所有
      {
        path: '/errorList/',
        name: 'errorList',
        component: _import('index'),
        redirect: 'errorList',
        meta: {
          title: '异常管理',
          icon: 'people',
          noCache: false
        },
        children: [{
          path: 'sopErrorList',
          component: _import('errorList/sopErrorList'),
          name: 'sopErrorList',
          meta: {
            title: '异常报表',
            icon: 'example',
            noCache: false,
            interfaceName: '异常报表'
          }
        }
        ]
      },
    ]
  },
  // 计划管理
  {
    // 工单单号，工单单别
    // 超级管理员与计划人员查看
    path: '/planManagement/',
    name: 'planManagement',
    component: Layout,
    redirect: 'planManagement',
    meta: {
      title: '计划管理',
      icon: 'people',
      noCache: false,
      roles: [0, 1, 2, 4, 7, 8,9,12,14,15, 16, 19,24, 25, 27, 29, 30, 32, 35, 36, 37, 38, 41, 42, 43,46]
    },
    children: [
      {
        path: '/productionplan/',
        name: 'productionplan',
        component: _import('index'),
        redirect: 'productionplan',
        meta: {
          title: '生产排产',
          icon: 'people',
          noCache: false,
          roles: [0, 1, 4, 7, 14, 16, 25, 27, 30, 32, 35, 36, 37, 38, 41, 42, 43]
        },
        children: [{
          path: 'addPlan',
          component: _import('productionPlan/addPlan'),
          name: 'add_Plan',
          meta: {
            title: '排产新增',
            icon: 'example',
            noCache: false,
            interfaceName: '排产新增',
            roles: [0, 4, 14, 16, 32, 42]
          }
        },
        {
          path: 'cncAddplan',
          component: _import('productionPlan/cncAddplan'),
          name: 'cncAddplan',
          meta: {
            title: '批量排产新增',
            icon: 'example',
            noCache: false,
            interfaceName: '批量排产新增',
            roles: [0, 4, 14, 16, 32, 42]
          }
        },
        // {
        //   path: 'sprayAddplan',
        //   component: _import('productionPlan/sprayAddplan'),
        //   name: 'sprayAddplan',
        //   meta: {
        //     title: '喷涂排产新增',
        //     icon: 'example',
        //     noCache: false,
        //     interfaceName: '喷涂排产新增',
        //     roles: [0, 14, 42]
        //   }
        // },
        {
          path: 'checkPlan',
          component: _import('productionPlan/checkPlan'),
          name: 'check_sPlan',
          meta: {
            title: '排产查询修改',
            icon: 'example',
            noCache: false,
            interfaceName: '排产查询修改',
            roles: [0, 1, 4, 7, 14, 16, 25, 27, 29, 30, 32, 35, 36, 37, 38, 41, 42, 43]
          }
        }
        ]
      },
      {
        path: '/orderForecasting/',
        name: 'orderForecasting',
        component: _import('index'),
        redirect: 'orderForecasting',
        meta: {
          title: '订单预测管理',
          icon: 'people',
          noCache: false,
          roles: [0, 2,4, 8,9,12,14,15,16, 19,24, 29,30,38,42,46]
        },
        children: [{
          path: 'attributeMaintenance',
          component: _import('orderForecasting/attributeMaintenance'),
          name: 'attribute_Maintenance',
          meta: {
            title: '订单属性维护',
            icon: 'example',
            noCache: false,
            interfaceName: '订单属性维护',
            roles: [0, 2,4, 8,9,12,14,15,16, 19,24, 29,30,38,42,46]
          }
        },
        {
          path: 'hrMaintenance',
          component: _import('orderForecasting/hrMaintenance'),
          name: 'hr_Maintenance',
          meta: {
            title: '人力基线维护',
            icon: 'example',
            noCache: false,
            interfaceName: '人力基线维护',
            roles: [0, 2,4, 8,9,12,14,15,16, 19,24, 29,30,38,42,46]
          }
        },
        {
          path: 'orderForecasting',
          component: _import('orderForecasting/orderForecasting'),
          name: 'order_Forecasting',
          meta: {
            title: '订单预测录入',
            icon: 'example',
            noCache: false,
            interfaceName: '订单预测录入',
            roles: [0, 2,4, 8,9,12,14,15,16, 19,24, 29,30,38,42,46]
          }
        }
        ]
      }
    ]
  },
  // 质量管理
  {
    path: '/qualityControl/',
    name: 'qualityControl',
    component: Layout,
    redirect: 'qualityControl',
    meta: {
      title: '质量管理',
      icon: 'people',
      noCache: false,
      roles: [0, 2, 3, 5, 6, 7, 10, 11, 14, 23, 24, 25, 37, 38, 39, 43]
    },
    children: [
      // 问题类别维护管理对超级管理员和员工管理员开放
      {
        path: '/problem/',
        name: 'problem',
        component: _import('index'),
        redirect: 'problem',
        meta: {
          title: '问题类别维护',
          icon: 'people',
          noCache: false,
          roles: [0, 2, 14, 37, 39]
        },
        children: [
          {
            path: 'addProblem',
            component: _import('problem/addProblem'),
            name: 'add_problem',
            meta: {
              title: '问题新增',
              icon: 'example',
              noCache: false,
              interfaceName: '问题新增',
              roles: [0, 2, 14, 39]
            }
          },
          {
            path: 'checkProblem',
            component: _import('problem/checkProblem'),
            name: 'check_problem',
            meta: {
              title: '问题查询',
              icon: 'example',
              noCache: false,
              interfaceName: '问题查询'
            }
          }
        ]
      },
      // 质量问题查询——查询图片以及视频
      {
        path: '/qualityQuery/',
        name: 'qualityQuery',
        component: _import('index'),
        redirect: 'qualityQuery',
        meta: {
          title: '质量问题查询',
          icon: 'people',
          noCache: true,
          roles: [0, 3, 5, 6, 7, 10, 11, 14, 23, 24, 25, 37, 38, 43]
        },
        children: [
          {
            path: 'CNCquality',
            component: _import('CNCmachine/CNCquality'),
            name: 'CNCquality',
            meta: {
              title: '前制程质量问题查询',
              icon: 'example',
              noCache: false,
              interfaceName: '前制程质量问题查询',
              roles: [0, 3, 14, 25, 37, 38, 43]
            }
          },
          {
          path: 'queryHomePage',
          component: _import('qualityQuery/queryHomePage'),
          name: 'queryHomePage',
          meta: {
            title: '装配质量问题查询',
            icon: 'example',
            noCache: true,
            interfaceName: '装配质量问题查询'
          }
        },
        { 
          path: 'qualityDetail',
          component: _import('qualityQuery/qualityDetail'),
          name:'qualityDetail',
          hidden: true,
          meta: {
            title: '质量详情',
            icon: 'example',
            noCache: true,
            interfaceName: '质量详情'
          }
        }
        ]
      },
      // 质量系数
      {
        path: '/coefficient/',
        name: 'coefficient',
        component: _import('index'),
        redirect: 'coefficient',
        meta: {
          title: '质量系数',
          icon: 'people',
          noCache: true,
          roles: [0, 1, 2, 3, 7, 11, 14, 15, 16, 19, 23, 24, 30, 37, 44]
        },
        children: [
          {
            path: 'massCoefficient',
            component: _import('performance/massCoefficient'),
            name: 'massCoefficient',
            meta: {
              title: '质量系数查询',
              icon: 'example',
              noCache: false,
              interfaceName: '质量系数查询',
              roles: [0, 1, 2, 3, 7, 11, 14, 15, 16, 19, 23, 24, 30, 37, 44]
            }
          },
          {
            path: 'massCoefficientDetail',
            component: _import('performance/massCoefficientDetail'),
            name: 'massCoefficientDetail',
            meta: {
              title: '质量扣罚明细',
              icon: 'example',
              noCache: false,
              interfaceName: '质量扣罚明细',
              roles: [0, 1, 2, 3, 7, 11, 14, 15, 16, 19, 23, 24, 30, 37, 44]
            }
          }
        ]
      }
    ]
  },
  // 工艺管理
  {
    // 工艺信息的添加
    // 对工艺人员与超级管理员开放
    path: '/technology/',
    name: 'technology',
    component: Layout,
    redirect: 'technology',
    meta: {
      title: '工艺管理',
      icon: 'people',
      noCache: false,
      roles: [0, 1, 3, 7, 14, 16, 23, 24, 27, 28, 30, 35, 36, 37]
    },
    children: [
      // 参数维护
      {
        path: '/parameter/',
        name: 'parameter',
        component: _import('index'),
        redirect: 'parameter',
        meta: {
          title: '参数维护',
          icon: 'people',
          noCache: false,
          roles: [0, 1, 3, 14, 16, 23, 24, 27, 30, 35, 36, 37]
        },
        children: [
          {
            path: 'emsScanningMaterial',
            component: _import('processRank/emsScanningMaterial'),
            name: 'emsScanningMaterial',
            meta: {
              title: 'ems车间扫码物料编码长度手动添加',
              icon: 'example',
              noCache: false,
              interfaceName: 'ems车间扫码物料编码长度手动添加',
              roles: [0, 1, 14, 35, 36]
            }
          },
          {
            // 喷涂管理
            // 对超级管理员开放
            path: 'sprayParameter',
            component: _import('weldManager/sprayParameter'),
            name: 'sprayParameter',
            meta: {
              title: '喷涂参数设置',
              icon: 'example',
              noCache: false,
              interfaceName: '喷涂参数设置',
              roles: [0, 14]
            }
          },
          {
            path: 'addfacilityBarcodeType',
            component: _import('processRank/addfacilityBarcodeType'),
            name: 'addfacilityBarcodeType',
            meta: {
              title: '工艺类型名称维护',
              icon: 'example',
              noCache: false,
              interfaceName: '工艺类型名称维护',
              roles: [0, 1, 14, 35, 36]
            }
          },
          {
            path: 'processCode',
            component: _import('processRank/processCode'),
            name: 'processCode',
            meta: {
              title: '工序编号维护',
              icon: 'example',
              noCache: false,
              interfaceName: '工序编号维护',
              roles: [0, 1, 14, 16, 27, 30, 35, 36, 37]
            }
          },
          {
            path: 'addPlate',
            component: _import('processRank/addPlate'),
            name: 'addPlate',
            meta: {
              title: '板材信息维护',
              icon: 'example',
              noCache: false,
              interfaceName: '板材信息维护',
              roles: [0, 14]
            }
          },
          {
            path: 'materialCutting',
            component: _import('processRank/materialCutting'),
            name: 'materialCutting',
            meta: {
              title: '开料表单',
              icon: 'example',
              noCache: false,
              interfaceName: '开料表单',
              roles: [0, 1, 3, 14, 16, 23, 24, 27, 30, 35, 36, 37]
            }
          }
        ]
      },
      // 工时管理
      {
        path: '/manhour/',
        name: 'manhour',
        component: _import('index'),
        redirect: 'manhour',
        meta: {
          title: '工时管理',
          icon: 'people',
          noCache: false,
          roles: [1, 14]
        },
        children: [
          {
            path: 'productHoursData',
            component: _import('performance/productHoursData'),
            name: 'productHoursData',
            meta: {
              title: '产品工序工时',
              icon: 'example',
              noCache: false,
              interfaceName: '产品工序工时',
              // roles: [0, 1, 2, 3, 7, 11, 14, 16, 19, 15, 27, 30, 36, 37, 44]
            }
          },
          {
            path: 'workHoursData',
            component: _import('performance/workHoursData'),
            name: 'workHours_Data',
            meta: {
              title: '员工工时',
              icon: 'example',
              noCache: false,
              interfaceName: '员工工时',
              // roles: [0, 1, 2, 3, 7, 14, 16, 15, 27, 30, 36, 37, 44]
            }
          },
          {
            path: 'gyworkHoursData',
            component: _import('processRank/gyworkHoursData'),
            name: 'gyworkHoursData',
            meta: {
              title: '主件品号工时数据',
              icon: 'example',
              noCache: true,
              interfaceName: '主件品号工时数据',
              // roles: [0, 1, 14, 16, 27, 30, 35, 36, 37]
            }
          },
        ]
      },
      // 工艺流程
      {
        path: '/technologicalProcess/',
        name: 'technologicalProcess',
        component: _import('index'),
        redirect: 'technologicalProcess',
        meta: {
          title: '工艺流程',
          icon: 'people',
          noCache: false,
          roles: [0, 1, 14, 16, 27, 30, 35, 36, 37]
        },
        children: [
          {
            path: 'addProcessRoute',
            component: _import('processRank/processRoute'),
            name: 'add_ProcessRoute',
            meta: {
              title: '工艺新增搜索修改',
              icon: 'example',
              noCache: false,
              interfaceName: '工艺新增搜索修改',
              roles: [0, 1, 14, 16, 27, 30, 35, 36, 37]
            }
          }
          // {
          //   path: 'ptprocessRoute',
          //   component: _import('processRank/ptprocessRoute'),
          //   name: 'ptadd_ProcessRoute',
          //   meta: {
          //     title: '喷涂工艺新增搜索修改',
          //     icon: 'example',
          //     noCache: false,
          //     interfaceName: '喷涂工艺新增搜索修改',
          //     roles: [0, 1, 14, 27, 30, 37]
          //   }
          // },
        ]
      },
      // 工装治具
      {
        path: '/fixture/',
        name: 'fixture',
        component: _import('index'),
        redirect: 'fixture',
        meta: {
          title: '工装治具',
          icon: 'people',
          noCache: false,
          roles: [0, 1, 3, 7, 14, 27, 28, 35, 36]
        },
        children:[
          // {
          //   path: 'frockregister',
          //   component: _import('processRank/frockregister'),
          //   name: 'frockregister',
          //   meta: {
          //     title: '工具工装出注册',
          //     icon: 'example',
          //     noCache: false,
          //     interfaceName: '工具工装出注册',
          //     // roles: [0, 14, 35, 36]
          //   }
          // },
          {
            path: 'registrationFile',
            component: _import('processRank/registrationFile'),
            name: 'registrationFile',
            meta: {
              title: '注册建档',
              icon: 'example',
              noCache: false,
              interfaceName: '注册建档',
              // roles: [0, 14, 35, 36]
            }
          },
          {
            path: 'frockInOrOut',
            component: _import('processRank/frockInOrOut'),
            name: 'frockInOrOut',
            meta: {
              title: '出入库处理',
              icon: 'example',
              noCache: false,
              interfaceName: '出入库处理',
              // roles: [0, 14, 35, 36]
            }
          },
          {
            path: 'frockconfigure',
            component: _import('processRank/frockconfigure'),
            name: 'frockconfigure',
            meta: {
              title: '工具工装工序配置',
              icon: 'example',
              noCache: false,
              interfaceName: '工具工装工序配置',
              // roles: [0, 14, 35, 36]
            }
          },
          // {
          //   path: 'frockFixture',
          //   component: _import('processRank/frockFixture'),
          //   name: 'frockFixture',
          //   meta: {
          //     title: '工具工装点检维护',
          //     icon: 'example',
          //     noCache: false,
          //     interfaceName: '工具工装点检维护',
          //     // roles: [0, 14, 35, 36]
          //   } 
          // },
          {
            path: 'maintenanceConfiguration',
            component: _import('processRank/maintenanceConfiguration'),
            name: 'maintenanceConfiguration',
            meta: {
              title: '点检/保养配置',
              icon: 'example',
              noCache: false,
              interfaceName: '点检/保养配置',
              // roles: [0, 14, 35, 36]
            }
          },
          {
            path: 'maintenanceItem',
            component: _import('processRank/maintenanceItem'),
            name: 'maintenanceItem',
            meta: {
              title: '点检/保养项目',
              icon: 'example',
              noCache: false,
              interfaceName: '点检/保养项目',
              // roles: [0, 14, 35, 36]
            }
          },
          {
            path: 'maintenanceRecord',
            component: _import('processRank/maintenanceRecord'),
            name: 'maintenanceRecord',
            meta: {
              title: '点检、保养记录',
              icon: 'example',
              noCache: false,
              interfaceName: '点检、保养记录',
              // roles: [0, 14, 35, 36]
            }
          },
          {
            path: 'unitCheck',
            component: _import('processRank/unitCheck'),
            name: 'unitCheck',
            meta: {
              title: '设备校验管理',
              icon: 'example',
              noCache: false,
              interfaceName: '设备校验管理',
              // roles: [0, 14, 35, 36]
            }
          },
        ]
      },
      // 上传PDF文件与视频
      {
        // 对工艺人员与超级管理员开放
        path: '/filesUpload/',
        name: 'filesUpload',
        component: _import('index'),
        redirect: 'filesUpload',
        meta: {
          title: '上传PDF与视频',
          icon: 'people',
          noCache: false,
          roles: [0, 1, 14, 16, 27, 30, 35, 36, 37]
        },
        children: [{
          path: 'addPdf',
          component: _import('filesUpload/addPdf'),
          name: 'add_Pdf',
          meta: {
            title: '文件上传',
            icon: 'example',
            noCache: false,
            interfaceName: '文件上传',
            roles: [0, 1, 14, 27, 30, 35, 36]
          }
        },
        {
          path: 'changePdf',
          component: _import('filesUpload/changePdf'),
          name: 'change_Pdf',
          meta: {
            title: '文件查询修改',
            icon: 'example',
            noCache: false,
            interfaceName: '文件查询修改'
          }
        }]
      },
      // ECN管理
      {
        // 对工艺人员与超级管理员开放
        // ECN查询额外对QC质量检、质量文员、质量总监开放
        path: '/ECN/',
        name: 'ECN',
        component: _import('index'),
        redirect: 'ECN',
        meta: {
          title: 'ECN管理', 
          icon: 'people',
          noCache: false,
          roles: [0, 1, 3, 7, 14, 16, 27, 23, 24, 30, 36, 37]
        },
        children: [{
          path: 'ECNadd',
          component: _import('ECNchange/ECNadd'), 
          name: 'ECNadd',
          meta: {
            title: 'ECN新增',
            icon: 'example',
            noCache: false,
            interfaceName: 'ECN新增',
            roles: [0, 1, 7, 14, 27, 36]
          }
        },
        {
          path: 'ECNlist',
          component: _import('ECNchange/ECNlist'),
          name: 'ECNlist',
          meta: {
            title: 'ECN查询修改',
            icon: 'example',
            noCache: true,
            interfaceName: 'ECN查询修改',
            roles: [0, 1, 3, 7, 14, 16, 23, 24, 27, 30, 36, 37]
          }
        }
        ]
      },
      // 条码管理
      {
        // 对工艺人员与超级管理员开放
        // ECN查询额外对QC质量检、质量文员、质量总监开放
        path: '/barCode/',
        name: 'barCode',
        component: _import('index'),
        redirect: 'barCode',
        meta: {
          title: '条码管理',
          icon: 'people',
          noCache: false,
          roles: [0, 1, 3, 7, 14, 16, 23, 24, 27, 30, 35, 36, 37]
        },
        children: [
          {
            path: 'ptsCode',
            component: _import('processRank/ptsCode'),
            name: 'ptsCode',
            meta: {
              title: 'pts条码配置',
              icon: 'example',
              noCache: false,
              interfaceName: 'pts条码配置',
              roles: [0, 1, 14, 27, 35, 36]
            }
          },
          {
            path: 'ptsCodeFind',
            component: _import('processRank/ptsCodeFind'),
            name: 'ptsCodeFind',
            meta: {
              title: 'pts条码配置历史查询',
              icon: 'example',
              noCache: false,
              interfaceName: 'pts条码配置历史查询',
              roles: [0, 1, 14, 16, 27, 30, 35, 36, 37]
            }
          },
          {
            path: 'codeUnbind',
            component: _import('processRank/codeUnbind'),
            name: 'codeUnbind',
            meta: {
              title: 'ems车间条码解绑',
              icon: 'example',
              noCache: false,
              interfaceName: 'ems车间条码解绑',
              roles: [0, 1, 14, 27, 30, 35, 36]
            }
          },
          {
            path: 'emsFind',
            component: _import('processRank/emsFind'),
            name: 'emsFind',
            meta: {
              title: 'ems查询',
              icon: 'example',
              noCache: false,
              interfaceName: 'ems查询',
              roles: [0, 1, 14, 16, 27, 30, 35, 36, 37]
            }
          },
          {
            path: 'codePassList',
            component: _import('processRank/codePassList'),
            name: 'codePassList',
            meta: {
              title: 'ems条码过站查询',
              icon: 'example',
              noCache: false,
              interfaceName: 'ems条码过站查询',
              // roles: [0, 1, 3, 14, 16, 23, 24, 27, 30, 35, 36, 37]
            }
          },
          {
            path: 'deviceBarcodeReplace',
            component: _import('emsPart/deviceBarcodeReplace'),
            name: 'deviceBarcodeReplace',
            meta: {
              title: 'ems条码替换',
              icon: 'example',
              noCache: false,
              interfaceName: 'ems条码替换',
              roles: [0, 14, 35, 36]
            }
          },
          {
            // 对工艺人员与超级管理员开放
            // ECN查询额外对QC质量检、质量文员、质量总监开放
            path: '/emstest/',
            name: 'emstest',
            component: _import('index'),
            redirect: 'emstest',
            meta: {
              title: 'ems测试',
              icon: 'people',
              noCache: false,
              // roles: [0, 1, 3, 14, 16, 23, 24, 27, 30, 35, 36, 37]
            },
            children: [
              {
                path: 'emstestInquire',
                component: _import('emsPart/emstestInquire'),
                name: 'emstestInquire',
                meta: {
                  title: '当前测试结果',
                  icon: 'example',
                  noCache: false,
                  interfaceName: '当前测试结果',
                  // roles: [0, 1, 3, 14, 16, 23, 24, 27, 30, 35, 36, 37]
                }
              },
              {
                path: 'emstestInquireMX',
                component: _import('emsPart/emstestInquireMX'),
                name: 'emstestInquireMX', 
                meta: {
                  title: '测试明细',
                  icon: 'example',  
                  noCache: false,
                  interfaceName: '测试明细',
                  // roles: [0, 1, 3, 14, 16, 23, 24, 27, 30, 35, 36, 37]
                }
              }
            ]
          } 
        ]
      }
    ]
  },
  // 人事管理
  {
    path: '/personnel/',
    name: 'personnel',
    component: Layout,
    redirect: 'personnel',
    meta: {
      title: '人事管理',
      icon: 'people',
      noCache: false,
      roles: [0, 2, 3, 7, 14, 19, 25, 30, 36, 37, 38, 39, 44]
    },
    children: [
      // 人员管理
      {
        // 用户信息新增，包括添加用户信息，查询，表单三个页面
        //  对员工管理人员与超级管理员开放
        path: '/addUser/',
        component: _import('index'),
        name: 'addUser',
        redirect: 'addUser',
        meta: {
          title: '人员管理',
          icon: 'people',
          noCache: false,
          inteinterfaceName: '人员管理',
          roles: [0, 2, 14, 37, 39, 44]
          // interfaceName: '用户新增',
          //  roles:[1]
        },
        children: [{
            path: 'addUserList',
            component: _import('chargingData/addUser'),
            name: 'addUser_List',
            meta: {
              title: '员工新增',
              icon: 'example',
              noCache: false,
              interfaceName: '员工新增',
              roles: [0, 2, 14, 39, 44]
            }
          },
          {
            path: 'charging_data_list',
            component: _import('chargingData/list'),
            name: 'charging_data_list',
            meta: {
              title: '员工查询修改',
              icon: 'form',
              noCache: false,
              interfaceName: '员工查询修改',
              requireAuth: true // 添加该字段，表示进入这个路由是需要登录的
            }
          },
          {
            path: 'updateData_List',
            component: _import('updateData/list'),
            name: 'updateData_List',
            hidden: true,
            meta: {
              title: '修改员工信息',
              icon: 'example',
              noCache: true,
              interfaceName: '修改员工信息'
            }
          },
          {
            path: 'userHonor',
            component: _import('performance/userHonor'),
            name: 'userHonor',
            meta: {
              title: '员工荣誉',
              icon: 'example',
              noCache: false,
              interfaceName: '员工荣誉',
              roles: [0, 14, 44]
            }
          },
        ]
      },
      // 工资管理
      {
        path: '/salary/',
        name: 'salary',
        component: _import('index'),
        redirect: 'salary',
        meta: {
          title: '工资管理',
          icon: 'people',
          noCache: false,
          inteinterfaceName: '工资管理',
          roles: [0, 2, 14, 30, 36, 37, 39, 44]
        },
        children: [
          {
            path: 'addFormual',
            component: _import('processRank/addFormual'),
            name: 'addFormual',
            meta: {
              title: '工资计算公式',
              icon: 'example',
              noCache: false,
              interfaceName: '工资计算公式',
              roles: [0, 14, 30, 44]
            }
          },
          {
            path: 'pieceworkPlan',
            component: _import('processRank/pieceworkPlan'),
            name: 'pieceworkPlan',
            meta: {
              title: '计件方案',
              icon: 'example',
              noCache: false,
              interfaceName: '计件方案',
              roles: [0, 14, 30, 37, 44]
            }
          },
          {
            path: 'userSalary',
            component: _import('performance/userSalary'),
            name: 'userSalary',
            meta: {
              title: '员工工资',
              icon: 'example',
              noCache: false,
              interfaceName: '员工工资',
              roles: [0, 2, 14, 44]
            }
          },
          {
            path: 'attendance',
            component: _import('performance/attendance'),
            name: 'attendance',
            meta: {
              title: '正班出勤',
              icon: 'example',
              noCache: false,
              interfaceName: '正班出勤',
              roles: [0, 2, 14, 39, 44]
            }
          },
          {
            path: 'emsPrice',
            component: _import('performance/emsPrice'),
            name: 'emsPrice',
            meta: {
              title: 'EMS单价维护',
              icon: 'example',
              noCache: false,
              interfaceName: 'EMS单价维护',
              roles: [0, 14, 30, 36, 44]
            }
          },
          {
            path: 'emsLumpsum',
            component: _import('performance/emsLumpsum'),
            name: 'emsLumpsum',
            meta: {
              title: 'EMS工时总包',
              icon: 'example',
              noCache: false, 
              interfaceName: 'EMS工时总包',
              roles: [0, 14, 30, 36]
            }
          },
          {
            path: 'addprocessCategory',
            component: _import('processRank/addprocessCategory'),
            name: 'addprocessCategory',
            hidden: true, // 影藏
            meta: {
              title: '计件方案维护',
              icon: 'example',
              noCache: false,
              interfaceName: '计件方案维护'
            }
          },
          // {
          //   path: 'ptMaintainsalary',
          //   component: _import('processRank/ptMaintainsalary'),
          //   name: 'ptMaintainsalary',
          //   meta: {
          //     title: '喷涂维护工资',
          //     icon: 'example',
          //     noCache: false,
          //     interfaceName: '喷涂维护工资',
          //     roles: [0, 14, 37, 44]
          //   }
          // },
        ]
      },
      // 绩效管理
      {
        path: '/performance/',
        name: 'performance',
        component: _import('index'),
        redirect: 'performance',
        meta: {
          title: '绩效管理',
          icon: 'people',
          noCache: false,
          inteinterfaceName: '绩效管理',
          roles: [0, 2, 3, 7, 14, 19, 25, 30, 36, 37, 38, 44]
        },
        children: [
          {
            path: 'perAppraisal',
            component: _import('performance/perAppraisal'),
            name: 'perAppraisal',
            meta: {
              title: '绩效考核',
              icon: 'example',
              noCache: false,
              interfaceName: '绩效考核',
              roles: [0, 2, 14, 37, 44]
            }
          },
          {
            path: 'addPerformance',
            component: _import('performance/addPerformance'),
            name: 'add_performance',
            meta: {
              title: '绩效增添',
              icon: 'example',
              noCache: false,
              interfaceName: '绩效增添',
              roles: [0, 2, 14, 36, 44]
            }
          },
          {
            path: 'statisticsPage',
            component: _import('performance/statisticsPage'),
            name: 'statistics_page',
            meta: {
              title: '绩效与质量',
              icon: 'example',
              noCache: false,
              interfaceName: '绩效与质量',
              roles: [0, 14]
            }
          },
          {
            path: 'changePerformance',
            component: _import('performance/changePerformance'),
            name: 'change_performance',
            meta: {
              title: '绩效查询删除',
              icon: 'example',
              noCache: false,
              interfaceName: '绩效查询删除',
              roles: [0, 2, 14, 25, 37, 38, 44]
            }
          },
          {
            path: 'addEvaluate',
            component: _import('evaluate/addEvaluate'),
            name: 'add_evaluate',
            meta: {
              title: '绩效评价新增',
              icon: 'example',
              noCache: false,
              interfaceName: '绩效评价新增',
              roles: [0, 2, 14, 44]
            }
          },
          {
            path: 'staffEvaluate',
            component: _import('evaluate/staffEvaluate'),
            name: 'staff_evaluate',
            meta: {
              title: '员工绩效评价查询',
              icon: 'example',
              noCache: false,
              interfaceName: '员工绩效评价查询'
            }
          }
          // 暂时去掉，2023-11-24
          // {
          //   path: 'leaderEvaluate',
          //   component: _import('evaluate/leaderEvaluate'),
          //   name: 'leader_evaluate',
          //   meta: {
          //     title: '工段绩效评价查询',
          //     icon: 'example',
          //     noCache: false,
          //     interfaceName: '工段绩效评价查询'
          //   }
          // }
        ]
      },
      // 考勤管理
      {
        path: '/clocking_in/',
        name: 'clocking_in',
        component: _import('index'),
        redirect: 'clocking_in',
        meta: {
          title: '考勤管理',
          icon: 'people',
          noCache: false,
          inteinterfaceName: '考勤管理',
          roles: [0, 2, 14, 37, 39, 44]
        },
        children: [{
          path: 'workRecord',
          component: _import('performance/workRecord'),
          name: 'work_record',
          meta: {
            title: '员工考勤记录',
            icon: 'example',
            noCache: false,
            interfaceName: '员工考勤记录',
            roles: [0, 2, 14, 37, 39, 44]
          }
        },
        {
          path: 'addReclockIn',
          component: _import('reClockIn/addReclockIn'),
          name: 'add_reclockIn',
          meta: {
            title: '补卡',
            icon: 'example',
            noCache: true,
            interfaceName: '补卡',
            roles: [0, 2, 14, 39]
          }
        },
        {
          path: 'reClockInList',
          component: _import('reClockIn/reClockInList'),
          name: 'reClockIn_list',
          meta: {
            title: '打卡记录查询',
            icon: 'example',
            noCache: false,
            interfaceName: '打卡记录查询'
          }
        }]
      },
      // 知识与技能
      {
        path: '/knowledgeSkill/',
        name: 'knowledgeSkill',
        component: _import('index'),
        redirect: 'knowledgeSkill',
        meta: {
          title: '知识与技能',
          icon: 'people',
          noCache: false,
          inteinterfaceName: '知识与技能',
          roles: [0, 2, 14, 37, 39, 44]
        },
        children: [
          {
            path: '/train/',
            name: 'train',
            component: _import('index'),
            redirect: 'train',
            meta: {
              title: '培训管理',
              icon: 'people',
              noCache: false,
            },
            children: [
              {
                path: 'inductionTraining',  
                component: _import('knowledgeSkill/inductionTraining'),
                name: 'inductionTraining',
                meta: {
                  title: '入职与培训',
                  icon: 'example',
                  noCache: false,
                  interfaceName: '入职与培训',
                  roles: [0, 2, 14, 37, 39, 44]
                }
              },
              {
                path: 'promotedManagement',
                component: _import('knowledgeSkill/promotedManagement'),
                name: 'promotedManagement',
                meta: {
                  title: '晋级管理',
                  icon: 'example',
                  noCache: false,
                  interfaceName: '晋级管理',
                  roles: [0, 2, 14, 37, 39, 44]
                }
              },
              {
                path: 'transferManagement',  
                component: _import('knowledgeSkill/transferManagement'),
                name: 'transferManagement',
                meta: {
                  title: '转岗管理',
                  icon: 'example',
                  noCache: false,
                  interfaceName: '转岗管理',
                  roles: [0, 2, 14, 37, 39, 44]
                }
              },
              {
                path: 'criticalProcess',
                component: _import('knowledgeSkill/criticalProcess'),
                name: 'criticalProcess',
                meta: {
                  title: '关键工序申请',
                  icon: 'example',
                  noCache: false,
                  interfaceName: '关键工序申请',
                  roles: [0, 2, 14, 37, 39, 44]
                }
              },
              {
                path: 'skillsResume',
                component: _import('knowledgeSkill/skillsResume'),
                name: 'skillsResume',
                meta: {
                  title: '员工培训履历',
                  icon: 'example',
                  noCache: false,
                  interfaceName: '员工培训履历',
                  roles: [0, 2, 14, 37, 39, 44]
                }
              },
            ]
          },
          {
            path: '/station/',
            name: 'station',
            component: _import('index'),
            redirect: 'station',
            meta: {
              title: '岗位管理',
              icon: 'people',
              noCache: false,
            },
            children:[
              {
                path: 'postMaintenance',
                component: _import('knowledgeSkill/postMaintenance'),
                name: 'postMaintenance',
                meta: {
                  title: '岗位维护与查询',
                  icon: 'example',
                  noCache: false,
                  interfaceName: '岗位维护与查询',
                  roles: [0, 2, 14, 37, 39, 44]
                }
              },
              {
                path: 'keyProcessManagement',
                component: _import('knowledgeSkill/keyProcessManagement'),
                name: 'keyProcessManagement',
                meta: {
                  title: '关键工序管理',    
                  icon: 'example',
                  noCache: false,
                  interfaceName: '关键工序管理',
                  roles: [0, 2, 14, 37, 39, 44]
                }
              },
              {
                path: 'employeeTransfer',  
                component: _import('knowledgeSkill/employeeTransfer'),
                name: 'employeeTransfer',
                meta: {
                  title: '员工转岗记录',
                  icon: 'example',
                  noCache: false,
                  interfaceName: '员工转岗记录',
                  roles: [0, 2, 14, 37, 39, 44]
                }
              },
            ]
          },
          {
            path: '/training/',
            name: 'training',
            component: _import('index'),
            redirect: 'training',
            meta: {
              title: '培训计划',
              icon: 'people',
              noCache: false,
            },
            children:[
              {
                path: 'mentorManagement',  
                component: _import('knowledgeSkill/mentorManagement'),
                name: 'mentorManagement',
                meta: {
                  title: '讲师&导师管理',
                  icon: 'example',
                  noCache: false,
                  interfaceName: '讲师&导师管理',
                  roles: [0, 2, 14, 37, 39, 44]
                }
              },
              {
                path: 'trainingProgram',  
                component: _import('knowledgeSkill/trainingProgram'),
                name: 'trainingProgram',
                meta: {
                  title: '培训计划与案例',
                  icon: 'example',
                  noCache: false,
                  interfaceName: '培训计划与案例',
                  roles: [0, 2, 14, 37, 39, 44]
                }
              },
              
            ]
          },
          {
            path: 'trainingResults',  
            component: _import('knowledgeSkill/trainingResults'),
            name: 'trainingResults',
            hidden: true, // 影藏
            meta: {
              title: '培训结果录入',
              icon: 'example',
              noCache: false,
              interfaceName: '培训结果录入',
              roles: [0, 2, 14, 37, 39, 44]
            }
          }
      ]
      },
    ]
  },
  // 系统管理
  {
    path: '/system/',
    name: 'system',
    component: Layout,
    redirect: 'system',
    meta: {
      title: '系统管理',
      icon: 'people',
      noCache: false,
      roles: [0, 2, 4, 7, 14, 37, 39, 44]
    },
    children: [
      // 工段管理
      {
        // 工段信息的添加
        // 对超级管理员和员工管理员(0,2,14)开放
        path: '/worksection/',
        name: 'worksection',
        component: _import('index'),
        redirect: 'worksection',
        meta: {
          title: '工段管理',
          icon: 'people',
          noCache: false,
          roles: [0, 2, 7, 14, 37, 39, 44]
        },
        children: [{
          path: 'addWorkSection',
          component: _import('worksection/addWorkSection'),
          name: 'add_WorkSection',
          meta: {
            title: '工段新增',
            icon: 'example',
            noCache: false,
            interfaceName: '工段新增',
            roles: [0, 14]
          }
        },
        {
          path: 'checkWorkSection',
          component: _import('worksection/checkWorkSection'),
          name: 'check_WorkSection',
          meta: {
            title: '工段查询删除修改',
            icon: 'example',
            noCache: false,
            interfaceName: '工段查询删除修改'
          }
        }]
      },
      // 超期预警配置
      {
        path: '/overdue/',
        name: 'overdue',
        component: _import('index'),
        redirect: 'overdue',
        meta: {
          title: '超期预警配置',
          icon: 'people',
          noCache: false,
          roles: [0, 4, 14]
        },
        children: [{
          path: 'overdueWarning',
          component: _import('processRank/overdueWarning'),
          name: 'overdueWarning',
          meta: {
            title: '超期预警配置',
            icon: 'example',
            noCache: false,
            interfaceName: '超期预警配置',
            roles: [0, 4, 14]
          }
        }]
      },
      // 新员工扫码检查项目
      {
        path: '/inspectionItem/',
        name: 'inspectionItem',
        component: _import('index'),
        redirect: 'inspectionItem',
        meta: {
          title: '新员工扫码检查项目',
          icon: 'people',
          noCache: false,
          roles: [0, 14]
        },
        children: [{
          path: 'newEmployeeProject',
          component: _import('processRank/newEmployeeProject'),
          name: 'newEmployeeProject',
          meta: {
            title: '新员工扫码检查项目',
            icon: 'example',
            noCache: false,
            interfaceName: '新员工扫码检查项目',
            roles: [0, 14]
          }
        }]
      },
      // oneNET信息管理
      {
        path: '/oneNET/',
        name: 'oneNET',
        component: _import('index'),
        redirect: 'oneNET',
        meta: {
          title: 'oneNET信息',
          icon: 'people',
          noCache: false,
          roles: [0, 14, 37]
        },
        children: [{
          path: 'addoneNET',
          component: _import('oneNET/addonenet'),
          name: 'add_oneNET',
          meta: {
            title: 'oneNET新增',
            icon: 'example',
            noCache: false,
            interfaceName: 'oneNET新增',
            roles: [0, 14]
          }
        },
        {
          path: 'changeoneNET',
          component: _import('oneNET/changeonenet'),
          name: 'change_oneNET',
          meta: {
            title: 'oneNET查询修改',
            icon: 'example',
            noCache: false,
            interfaceName: 'oneNET查询修改'
          }
        }]
      },
      // APk
      {
        path: '/APK/',
        name: 'APK',
        component: _import('index'),
        redirect: 'APK',  
        meta: {
          title: 'APK',
          icon: 'people',
          noCache: false,
          roles: [0, 14]
        },
        children: [{
          path: 'addAPK',
          component: _import('APK/addApk'),
          name: 'add_APK',
          meta: {
            title: 'APK上传',
            icon: 'example',
            noCache: false,
            interfaceName: 'APK上传',
            roles: [0, 14]
          }
        },
        {
          path: 'changeAPK',
          component: _import('APK/changeApk'),
          name: 'change_APK',
          meta: {
            title: 'APK查询修改',
            icon: 'example',
            noCache: false,
            interfaceName: 'APK查询修改'
          }
        }]
      },
        // 后台权限设置
        {
        path: '/manager/',
        name: 'manager',
        component: _import('index'),
        redirect: 'manager',
        meta: {
          title: '后台权限设置',
          icon: 'people',
          noCache: false,
          roles: [0, 2, 14, 37]
        },
        children: [{
          path: 'addManagerList',
          component: _import('manager/addManager'),
          name: 'addManager_List',
          meta: {
            title: '管理添加',
            icon: 'example',
            noCache: false,
            interfaceName: '管理添加',
            roles: [0, 2, 14]
          }
        },
        {
          path: 'checkManagerList',
          component: _import('manager/checkManager'),
          name: 'checkManager_List',
          meta: {
            title: '管理查看',
            icon: 'example',
            noCache: false,
            interfaceName: '管理查看'
          }
        }]
      },
    ]
  },

  {
    path: '/processrank/',
    name: 'processrank',
    component: Layout,
    redirect: 'processrank',
    hidden: true, // 影藏
    meta: {
      title: '工艺管理',
      icon: 'people',
      noCache: false,
      roles: [0, 1, 3, 14, 16, 23, 24, 27, 30, 35, 36, 37, 44]
    },
    children: [
      {
        path: 'addProcessRoute1',
        component: _import('processRank/addProcessRoute'),
        name: 'addProcessRoute1',
        hidden: true, // 影藏
        meta: {
          title: '录入产品工艺路线',
          icon: 'example',
          noCache: false,
          interfaceName: '录入产品工艺路线'
        }
      },

    ]
  },

  {
    path: '*',
    redirect: '/404',
    hidden: true
  }
]

// 初始路由参数，如登录 首页 404等共有页面 不需要权限控制的路由
export const constantRouterMap = [{
  path: '/welcome',
  component: Layout,
  redirect: '/welcome/index',
  children: [{
    path: 'index',
    component: welcome,
    name: 'welcome',
    meta: {
      title: '欢迎页',
      icon: 'dashboard',
      noCache: true
    }
  }]
},

{
  path: '/',
  redirect: '/login',
  hidden: true
},
{
  path: '/login',
  name: 'login',
  component: _import('login/index'),
  hidden: true
},
{
  path: '/404',
  name: '404',
  component: _import('errorPage/404'),
  hidden: true
},
{
  path: '/401',
  name: '401',
  component: _import('errorPage/401'),
  hidden: true
}
]

export const constUrl = [
  ...asyncRouterMap,
  ...constantRouterMap
]
